
<%@page import="com.gr.uth.dao.UserDAO"%>
<!-- 
    Document   : login
    Created on : Jan 9, 2013, 3:43:46 PM
    Author     : mruiz-->


<%@page import="gestors.LoginService"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<%
    String username = request.getParameter("login_username");
    String password = request.getParameter("login_password");
    UserDAO user = LoginService.login(username, password);

    if (user != null) {
        session.setAttribute("userSession", user);
    }
    String appPath = request.getContextPath();
    response.sendRedirect(appPath + "/index.jsp");
%>
